function showLargeImg(url){
    layer.photos({
        offset: 't',
        photos: {'data': [
            {
                src: url
            }
        ]},
        anim: 5
    });
}

$('#show-container').on('click', function(){
    let url = $(this).attr('url-attr');
    showLargeImg(url)
})

$('#img-list').on('click', 'img', function(){
    let url = 'url('+$(this).attr('src')+")";
    $('#show-container').css('background-image',url)
    $('#show-container').attr('url-attr', $(this).attr('src'))
})

function get_qr_code(){
    //示范一个公告层
    layer.open({
        type: 1
        ,title: false //不显示标题栏
        ,closeBtn: false
        ,area: '300px;'
        ,shade: 0.8
        ,id: 'LAY_layuipro' //设定一个id，防止重复弹出
        ,btn: ['残忍拒绝']
        ,btnAlign: 'c'
        ,moveType: 1 //拖拽模式，0或者1
        ,offset: '100px'
        ,content: '<div style="padding: 50px; line-height: 22px; background-color: #393D49; color: #fff; font-weight: 300;"><img src="/static/image/common/qrcode.png" style="width: 100%; object-fit: cover;"/><p style="font-size: 18px; font-weight: 600; color: #61B736;text-align: center; margin: 20px">扫码购买</p></div>'
    });
}